home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13447 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  2.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 68 61 | 6d 62 6c 69 6e 2e 6d 61 |Path: ha|mblin.ma|
|00000010| 74 68 2e 62 79 75 2e 65 | 64 75 21 75 73 65 6e 65 |th.byu.e|du!usene|
|00000020| 74 0a 46 72 6f 6d 3a 20 | 68 61 6c 6c 40 63 73 2e |t.From: |hall@cs.|
|00000030| 62 79 75 2e 65 64 75 20 | 28 4b 65 6c 6c 79 20 48 |byu.edu |(Kelly H|
|00000040| 61 6c 6c 29 0a 4e 65 77 | 73 67 72 6f 75 70 73 3a |all).New|sgroups:|
|00000050| 20 63 6f 6d 70 2e 6c 61 | 6e 67 2e 6d 69 73 63 2c | comp.la|ng.misc,|
|00000060| 63 6f 6d 70 2e 6c 61 6e | 67 2e 63 2c 67 6e 75 2e |comp.lan|g.c,gnu.|
|00000070| 67 63 63 0a 53 75 62 6a | 65 63 74 3a 20 52 65 3a |gcc.Subj|ect: Re:|
|00000080| 20 43 20 63 6f 6d 70 69 | 6c 65 72 73 20 77 68 69 | C compi|lers whi|
|00000090| 63 68 20 6f 70 74 69 6d | 69 7a 65 20 74 61 69 6c |ch optim|ize tail|
|000000a0| 20 63 61 6c 6c 73 20 28 | 77 61 73 3a 20 47 4f 54 | calls (|was: GOT|
|000000b0| 4f 20 63 6f 6e 74 72 6f | 76 65 72 73 79 29 0a 46 |O contro|versy).F|
|000000c0| 6f 6c 6c 6f 77 75 70 2d | 54 6f 3a 20 63 6f 6d 70 |ollowup-|To: comp|
|000000d0| 2e 6c 61 6e 67 2e 63 0a | 44 61 74 65 3a 20 30 36 |.lang.c.|Date: 06|
|000000e0| 20 41 70 72 20 31 39 39 | 36 20 31 38 3a 31 38 3a | Apr 199|6 18:18:|
|000000f0| 34 31 20 2d 30 36 30 30 | 0a 4f 72 67 61 6e 69 7a |41 -0600|.Organiz|
|00000100| 61 74 69 6f 6e 3a 20 43 | 6f 6d 70 75 74 65 72 20 |ation: C|omputer |
|00000110| 53 63 69 65 6e 63 65 20 | 44 65 70 74 2e 20 42 59 |Science |Dept. BY|
|00000120| 55 0a 53 65 6e 64 65 72 | 3a 20 68 61 6c 6c 40 6c |U.Sender|: hall@l|
|00000130| 79 6e 78 2e 63 73 2e 62 | 79 75 2e 65 64 75 0a 4d |ynx.cs.b|yu.edu.M|
|00000140| 65 73 73 61 67 65 2d 49 | 44 3a 20 3c 6f 75 69 76 |essage-I|D: <ouiv|
|00000150| 66 63 6e 61 78 71 2e 66 | 73 66 40 6c 79 6e 78 2e |fcnaxq.f|sf@lynx.|
|00000160| 63 73 2e 62 79 75 2e 65 | 64 75 3e 0a 52 65 66 65 |cs.byu.e|du>.Refe|
|00000170| 72 65 6e 63 65 73 3a 20 | 3c 33 31 34 46 42 35 46 |rences: |<314FB5F|
|00000180| 35 2e 32 35 39 42 40 73 | 69 6d 69 2e 69 73 3e 20 |5.259B@s|imi.is> |
|00000190| 3c 41 44 38 37 44 42 32 | 37 39 36 36 38 44 39 46 |<AD87DB2|79668D9F|
|000001a0| 37 34 40 6d 63 64 69 61 | 6c 61 31 35 2e 69 74 2e |74@mcdia|la15.it.|
|000001b0| 6c 75 63 2e 65 64 75 3e | 0a 09 3c 38 32 38 35 34 |luc.edu>|..<82854|
|000001c0| 39 36 31 39 73 6e 7a 40 | 67 65 6e 65 73 69 73 2e |9619snz@|genesis.|
|000001d0| 64 65 6d 6f 6e 2e 63 6f | 2e 75 6b 3e 20 3c 6f 75 |demon.co|.uk> <ou|
|000001e0| 6e 33 34 74 6d 33 63 37 | 2e 66 73 66 40 6c 79 6e |n34tm3c7|.fsf@lyn|
|000001f0| 78 2e 63 73 2e 62 79 75 | 2e 65 64 75 3e 0a 09 3c |x.cs.byu|.edu>..<|
|00000200| 44 70 43 76 38 6f 2e 39 | 4d 77 40 69 64 61 2e 6c |DpCv8o.9|Mw@ida.l|
|00000210| 69 75 2e 73 65 3e 0a 4e | 4e 54 50 2d 50 6f 73 74 |iu.se>.N|NTP-Post|
|00000220| 69 6e 67 2d 48 6f 73 74 | 3a 20 6c 79 6e 78 2e 63 |ing-Host|: lynx.c|
|00000230| 73 2e 62 79 75 2e 65 64 | 75 0a 4d 69 6d 65 2d 56 |s.byu.ed|u.Mime-V|
|00000240| 65 72 73 69 6f 6e 3a 20 | 31 2e 30 20 28 67 65 6e |ersion: |1.0 (gen|
|00000250| 65 72 61 74 65 64 20 62 | 79 20 74 6d 2d 65 64 69 |erated b|y tm-edi|
|00000260| 74 20 37 2e 34 36 29 0a | 43 6f 6e 74 65 6e 74 2d |t 7.46).|Content-|
|00000270| 54 79 70 65 3a 20 74 65 | 78 74 2f 70 6c 61 69 6e |Type: te|xt/plain|
|00000280| 3b 20 63 68 61 72 73 65 | 74 3d 55 53 2d 41 53 43 |; charse|t=US-ASC|
|00000290| 49 49 0a 49 6e 2d 72 65 | 70 6c 79 2d 74 6f 3a 20 |II.In-re|ply-to: |
|000002a0| 72 69 63 77 65 40 69 64 | 61 2e 6c 69 75 2e 73 65 |ricwe@id|a.liu.se|
|000002b0| 27 73 20 6d 65 73 73 61 | 67 65 20 6f 66 20 54 68 |'s messa|ge of Th|
|000002c0| 75 2c 20 34 20 41 70 72 | 20 31 39 39 36 20 32 30 |u, 4 Apr| 1996 20|
|000002d0| 3a 35 30 3a 34 37 20 47 | 4d 54 0a 58 2d 4e 65 77 |:50:47 G|MT.X-New|
|000002e0| 73 72 65 61 64 65 72 3a | 20 47 6e 75 73 20 76 35 |sreader:| Gnus v5|
|000002f0| 2e 30 2e 31 35 0a 0a 3e | 3e 3e 3e 3e 20 22 52 69 |.0.15..>|>>>> "Ri|
|00000300| 63 6b 61 72 64 22 20 3d | 3d 20 52 69 63 6b 61 72 |ckard" =|= Rickar|
|00000310| 64 20 57 65 73 74 6d 61 | 6e 20 3c 72 69 63 77 65 |d Westma|n <ricwe|
|00000320| 40 69 64 61 2e 6c 69 75 | 2e 73 65 3e 20 77 72 69 |@ida.liu|.se> wri|
|00000330| 74 65 73 3a 0a 20 20 20 | 20 52 69 63 6b 61 72 64 |tes:. | Rickard|
|00000340| 3e 20 54 68 65 20 73 61 | 64 20 74 72 75 74 68 20 |> The sa|d truth |
|00000350| 69 73 20 74 68 61 74 20 | 74 68 69 73 20 70 72 6f |is that |this pro|
|00000360| 67 72 61 6d 2c 20 63 6f | 6d 70 69 6c 65 64 20 77 |gram, co|mpiled w|
|00000370| 69 74 68 20 47 43 43 0a | 20 20 20 20 52 69 63 6b |ith GCC.| Rick|
|00000380| 61 72 64 3e 20 32 2e 37 | 2e 30 20 28 2d 4f 33 29 |ard> 2.7|.0 (-O3)|
|00000390| 2c 20 62 6c 6f 77 73 20 | 74 68 65 20 73 74 61 63 |, blows |the stac|
|000003a0| 6b 20 77 68 65 6e 20 74 | 65 73 74 65 64 20 77 69 |k when t|ested wi|
|000003b0| 74 68 20 61 20 6e 75 6d | 62 65 72 0a 20 20 20 20 |th a num|ber. |
|000003c0| 52 69 63 6b 61 72 64 3e | 20 6c 61 72 67 65 20 65 |Rickard>| large e|
|000003d0| 6e 6f 75 67 68 2e 20 20 | 54 61 69 6c 20 63 61 6c |nough. |Tail cal|
|000003e0| 6c 73 20 77 69 74 68 69 | 6e 20 61 20 73 69 6e 67 |ls withi|n a sing|
|000003f0| 6c 65 20 66 75 6e 63 74 | 69 6f 6e 20 73 65 65 6d |le funct|ion seem|
|00000400| 73 0a 20 20 20 20 52 69 | 63 6b 61 72 64 3e 20 74 |s. Ri|ckard> t|
|00000410| 6f 20 62 65 20 6f 70 74 | 69 6d 69 7a 65 64 2c 20 |o be opt|imized, |
|00000420| 74 68 6f 75 67 68 2c 20 | 62 75 74 20 74 68 69 73 |though, |but this|
|00000430| 20 6c 69 6d 69 74 61 74 | 69 6f 6e 20 69 73 20 72 | limitat|ion is r|
|00000440| 65 61 6c 6c 79 0a 20 20 | 20 20 52 69 63 6b 61 72 |eally. | Rickar|
|00000450| 64 3e 20 74 6f 6f 20 72 | 65 73 74 72 69 63 74 69 |d> too r|estricti|
|00000460| 76 65 20 66 6f 72 20 70 | 65 6f 70 6c 65 20 77 68 |ve for p|eople wh|
|00000470| 6f 20 77 61 6e 74 20 74 | 6f 20 70 72 6f 67 72 61 |o want t|o progra|
|00000480| 6d 20 69 6e 20 61 0a 20 | 20 20 20 52 69 63 6b 61 |m in a. | Ricka|
|00000490| 72 64 3e 20 66 75 6e 63 | 74 69 6f 6e 61 6c 20 73 |rd> func|tional s|
|000004a0| 74 79 6c 65 20 28 6f 72 | 20 74 72 61 6e 73 6c 61 |tyle (or| transla|
|000004b0| 74 65 20 66 75 6e 63 74 | 69 6f 6e 61 6c 20 70 72 |te funct|ional pr|
|000004c0| 6f 67 72 61 6d 73 20 74 | 6f 20 43 29 2e 0a 0a 48 |ograms t|o C)...H|
|000004d0| 6d 6d 20 2d 20 49 20 6e | 65 76 65 72 20 62 6f 74 |mm - I n|ever bot|
|000004e0| 68 65 72 65 64 20 74 6f | 20 74 72 79 20 6d 75 74 |hered to| try mut|
|000004f0| 75 61 6c 6c 79 20 28 74 | 61 69 6c 29 72 65 63 75 |ually (t|ail)recu|
|00000500| 72 73 69 76 65 20 66 75 | 6e 63 74 69 6f 6e 73 2e |rsive fu|nctions.|
|00000510| 20 20 49 27 6d 0a 6e 6f | 74 20 72 65 61 6c 6c 79 | I'm.no|t really|
|00000520| 20 73 75 72 70 72 69 73 | 65 64 20 74 68 61 74 20 | surpris|ed that |
|00000530| 47 63 63 20 64 6f 65 73 | 6e 27 74 20 68 61 6e 64 |Gcc does|n't hand|
|00000540| 6c 65 20 74 68 65 20 63 | 61 6c 6c 73 20 77 65 6c |le the c|alls wel|
|00000550| 6c 2e 0a 0a 20 20 20 20 | 52 69 63 6b 61 72 64 3e |l... |Rickard>|
|00000560| 20 4f 6e 20 74 68 65 20 | 6f 74 68 65 72 20 68 61 | On the |other ha|
|00000570| 6e 64 2c 20 53 75 6e 73 | 20 75 6e 62 75 6e 64 6c |nd, Suns| unbundl|
|00000580| 65 64 20 43 20 63 6f 6d | 70 69 6c 65 72 20 28 76 |ed C com|piler (v|
|00000590| 33 2e 30 2e 31 29 0a 20 | 20 20 20 52 69 63 6b 61 |3.0.1). | Ricka|
|000005a0| 72 64 3e 20 73 65 65 6d | 73 20 74 6f 20 68 61 6e |rd> seem|s to han|
|000005b0| 64 6c 65 20 74 68 69 73 | 20 65 78 61 6d 70 6c 65 |dle this| example|
|000005c0| 20 77 65 6c 6c 2c 20 61 | 73 20 77 65 6c 6c 20 61 | well, a|s well a|
|000005d0| 73 20 6d 75 74 75 61 6c | 0a 20 20 20 20 52 69 63 |s mutual|. Ric|
|000005e0| 6b 61 72 64 3e 20 72 65 | 63 75 72 73 69 6f 6e 20 |kard> re|cursion |
|000005f0| 62 65 74 77 65 65 6e 20 | 64 69 66 66 65 72 65 6e |between |differen|
|00000600| 74 20 63 6f 6d 70 69 6c | 61 74 69 6f 6e 20 75 6e |t compil|ation un|
|00000610| 69 74 73 2e 20 20 54 68 | 65 20 44 45 43 0a 20 20 |its. Th|e DEC. |
|00000620| 20 20 52 69 63 6b 61 72 | 64 3e 20 4f 53 46 2f 31 | Rickar|d> OSF/1|
|00000630| 20 63 6f 6d 70 69 6c 65 | 72 20 28 76 33 2e 31 31 | compile|r (v3.11|
|00000640| 20 6f 6e 20 61 6e 20 41 | 6c 70 68 61 29 20 61 6c | on an A|lpha) al|
|00000650| 73 6f 20 64 6f 65 73 20 | 4f 4b 2c 20 62 75 74 20 |so does |OK, but |
|00000660| 6f 6e 6c 79 0a 20 20 20 | 20 52 69 63 6b 61 72 64 |only. | Rickard|
|00000670| 3e 20 77 69 74 68 69 6e | 20 61 20 73 69 6e 67 6c |> within| a singl|
|00000680| 65 20 63 6f 6d 70 69 6c | 61 74 69 6f 6e 20 75 6e |e compil|ation un|
|00000690| 69 74 2e 20 20 4d 6f 72 | 65 20 64 61 74 61 20 70 |it. Mor|e data p|
|000006a0| 6f 69 6e 74 73 3f 0a 0a | 49 20 74 72 69 65 64 20 |oints?..|I tried |
|000006b0| 74 68 69 73 20 74 65 73 | 74 20 77 69 74 68 20 62 |this tes|t with b|
|000006c0| 6f 74 68 20 74 68 65 20 | 48 50 20 43 20 63 6f 6d |oth the |HP C com|
|000006d0| 70 69 6c 65 72 20 28 74 | 68 65 20 64 65 76 65 6c |piler (t|he devel|
|000006e0| 6f 70 6d 65 6e 74 0a 63 | 6f 6d 70 69 6c 65 72 2c |opment.c|ompiler,|
|000006f0| 20 77 69 74 68 20 6d 6f | 73 74 20 70 61 74 63 68 | with mo|st patch|
|00000700| 65 73 29 20 61 6e 64 20 | 47 43 43 20 32 2e 36 2e |es) and |GCC 2.6.|
|00000710| 33 2e 20 20 42 6f 74 68 | 20 73 65 65 6d 65 64 20 |3. Both| seemed |
|00000720| 74 6f 20 72 75 6e 20 6f | 75 74 20 6f 66 0a 67 61 |to run o|ut of.ga|
|00000730| 73 20 61 74 20 61 62 6f | 75 74 20 74 68 65 20 73 |s at abo|ut the s|
|00000740| 61 6d 65 20 72 61 74 65 | 2e 20 20 53 6f 20 49 20 |ame rate|. So I |
|00000750| 74 68 69 6e 6b 20 74 68 | 61 74 20 48 50 20 28 61 |think th|at HP (a|
|00000760| 6e 64 20 46 53 46 29 20 | 6d 69 67 68 74 20 73 74 |nd FSF) |might st|
|00000770| 61 6e 64 0a 74 6f 20 69 | 6d 70 72 6f 76 65 20 74 |and.to i|mprove t|
|00000780| 68 65 69 72 20 68 61 6e | 64 6c 69 6e 67 20 6f 66 |heir han|dling of|
|00000790| 20 6d 75 74 75 61 6c 20 | 28 74 61 69 6c 29 20 72 | mutual |(tail) r|
|000007a0| 65 63 75 72 73 69 6f 6e | 2e 0a 0a 20 20 20 20 52 |ecursion|... R|
|000007b0| 69 63 6b 61 72 64 3e 20 | 41 6c 6c 20 69 6e 20 61 |ickard> |All in a|
|000007c0| 6c 6c 2c 20 49 20 64 6f | 6e 27 74 20 74 68 69 6e |ll, I do|n't thin|
|000007d0| 6b 20 69 74 27 73 20 77 | 69 73 65 20 74 6f 20 61 |k it's w|ise to a|
|000007e0| 73 73 75 6d 65 20 74 68 | 61 74 20 74 61 69 6c 0a |ssume th|at tail.|
|000007f0| 20 20 20 20 52 69 63 6b | 61 72 64 3e 20 63 61 6c | Rick|ard> cal|
|00000800| 6c 20 6f 70 74 69 6d 69 | 7a 61 74 69 6f 6e 20 69 |l optimi|zation i|
|00000810| 73 20 64 6f 6e 65 20 62 | 79 20 74 68 65 20 74 79 |s done b|y the ty|
|00000820| 70 69 63 61 6c 20 43 20 | 63 6f 6d 70 69 6c 65 72 |pical C |compiler|
|00000830| 2e 0a 0a 49 20 73 74 61 | 6e 64 20 63 6f 72 72 65 |...I sta|nd corre|
|00000840| 63 74 65 64 2e 20 20 53 | 6f 20 77 68 79 20 68 61 |cted. S|o why ha|
|00000850| 76 65 6e 27 74 20 6d 6f | 72 65 20 43 20 63 6f 6d |ven't mo|re C com|
|00000860| 70 69 6c 65 72 20 66 6f | 6c 6b 73 20 61 64 64 65 |piler fo|lks adde|
|00000870| 64 20 74 68 69 73 0a 75 | 73 65 66 75 6c 20 6f 70 |d this.u|seful op|
|00000880| 74 69 6d 69 7a 61 74 69 | 6f 6e 3f 0a 0a 4b 65 6c |timizati|on?..Kel|
|00000890| 6c 79 0a | |ly. | |
+--------+-------------------------+-------------------------+--------+--------+